package org.woozoo.xhtml.unittests.selectorsuite.selector
{
	import org.flexunit.asserts.assertTrue;
	import org.woozoo.xhtml.core.util.ElementArrayUtil;
	import org.woozoo.xhtml.unittests.selectorsuite.Case1;

	public class TildCase extends Case1
	{
		[Test(order=1)]
		public function findElementH3FollowedByP() : void {
			results = document.$$('h3~p');
			assertTrue(hasResultsAndLenEqual(4));
		}

		[Test(order=2)]
		public function findElementH3InBodyFollowedByP() : void {
			results = document.$$('body h3~p');
			assertTrue(hasResultsAndLenEqual(4));
		}

		[Test(order=2)]
		public function findElementStarInBodyFollowedByP() : void {
			results = document.$$('*~p');
			var results1 : Array = document.$$('~p');
			assertTrue(hasResultsAndLenEqual(8) && ElementArrayUtil.isEqual(results1, results));
		}
	}
}